import java.text.SimpleDateFormat;
import java.util.Date;

public class main {
    public static void main(String[] args) throws Exception {
        String dateString = "2023-04-20 22:27:39";
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date = format.parse(dateString);
        long timeCode = date.getTime();
        System.out.println(timeCode);
    }
}